package xcmg.syn.web.order;

import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xcmg.syn.infra.BasicController;
import xcmg.syn.service.order.MmSwOrderService;
import xcmg.syn.service.vo.order.MmSwOrderLabelVO;
import xcmg.syn.service.vo.order.MmSwOrderVO;
import yb.ecp.fast.infra.annotation.FastMappingInfo;
import yb.ecp.fast.infra.infra.ActionResult;

import java.util.List;


@RestController
@RequestMapping("/mmSwOrder")
public class MmSwOrderController extends BasicController {
    @Autowired
    private MmSwOrderService mmSwOrderService;

    @PostMapping(value = "/list")
    @ApiOperation("listMmSwOrderVO")
    @FastMappingInfo(needLogin = true)
    public ActionResult<List<MmSwOrderVO>> listMmSwOrderVO(@RequestBody MmSwOrderVO condition) {
        List<MmSwOrderVO> list = mmSwOrderService.queryList(condition);
        return actionResult(list);
    }


    @PostMapping(value = "/queryLabelList")
    @ApiOperation("queryLabelList")
    @FastMappingInfo(needLogin = true)
    public ActionResult<List<MmSwOrderLabelVO>> queryLabelList(@RequestBody MmSwOrderLabelVO condition) {
        List<MmSwOrderLabelVO> list = mmSwOrderService.queryLabelList(condition);
        return actionResult(list);
    }
}
